<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/meeting/order/save}">
        <input type="hidden" name="id" th:if="${orderInfo}" th:value="${orderInfo.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">预订人</label>
            <div class="layui-input-inline">
                <div th:replace="/common/fragment :: selectTag('userId',${users},${orderInfo?.userId},'id','nickname','')"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">预订的会议室</label>
            <div class="layui-input-inline">
                <div th:replace="/common/fragment :: selectTag('meetingId',${rooms},${orderInfo?.meetingId},'id','title','')"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">会议开始时间</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" id="startTime" name="startTime" placeholder="请输入会议开始时间" th:value="${#dates.format(orderInfo?.startTime,'yyyy-MM-dd HH:mm:ss')}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">会议结束时间</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" id="endTime" name="endTime" placeholder="请输入会议结束时间" th:value="${#dates.format(orderInfo?.endTime,'yyyy-MM-dd HH:mm:ss')}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">会议主题</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="subject" placeholder="请输入会议主题" th:value="${orderInfo?.subject}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">参会人数</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="persons" placeholder="请输入参会人数" th:value="${orderInfo?.persons}">
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>

    <script>
        layui.use(['laydate'],function () {
            var laydate = layui.laydate
            laydate.render({
                elem: '#startTime',
                type:'datetime'
            });
        });

        layui.use(['laydate'],function () {
            var laydate = layui.laydate
            laydate.render({
                elem: '#endTime',
                type:'datetime'
            });
        });
    </script>
</body>
</html>